xlab
{GGPLOT2}
Label the x axis (ggplot)
mutate
{dplyr}
Modify/create a column in a data frame
theme_bw
{GGPLOT2}
A black and white ggplot theme
nrow
{base}
Get number of rows of a data frame
print
{base}
Print object to the console
addmargins
{stats}
Puts Arbitrary Margins on Multidimensional Tables or Arrays
hist
{graphics}
Plot a simple histogram
tapply
{base}
Create statistical summaries by group based on the levels of one or several factors
get_mode
{rstatix}
Compute the mode in a given vector.
geom_density
{GGPLOT2}
Generates a density plot
ggtitle
{GGPLOT2}
Generates a title for a ggplot graph
element_text
{GGPLOT2}
Customise text in GGPLOT2
element_blank
{GGPLOT2}
This theme element draws nothing, and assigns no space
after_stat
{GGPLOT2}
Control aesthetic evaluation. On the module used for displying percent
cut
{base}
Convert Numeric to Factor
cor.test
{stats}
Test for Association/Correlation Between Paired Samples
is.na
{base}
Check if a value is NA/elements of vector are NA
levels
{base}
Get levels of a factor
which
{base}
return indexes of TRUE entries of a logical vector
library
{base}
Load an R package
plotPlane
{rockchalk}
Draw a 3-D regression plot for two predictors
rnorm
{base}
Generate random numbers from a normal distribution
unique
{base}
get unique elements
seq
{base}
Create a sequence
quantile
{stats}
Obtain empirical quantiles of a vector
colnames
{base}
Retrieve column names of a data frame
sd
{stats}
Get standard deviation of a vector
lprop
{questionr}
Display row percentages of a two-way frequency table
cor
{stats}
Calculate Correlation Matrix
data.frame
{base}
Create a data.frame from vectors
prop.test
{stats}
Test of Equal or Given Proportions
dim
{base}
Get dimensions of a data frame
ungroup
{dplyr}
Resolve grouping created with “group_by”
filter
{dplyr}
Filter out rows of a data frame according to logical vector
summarise
{dplyr}
collapse the dataset to a summary statistic. Usually used with group_by()
par
{graphics}
Set parameters of the plotting device
expression
{base}
Used in plots to add symbols to axes
bar
{base}
Used for annotations, such as “expression(paste(”-“,bar(y)))”
runif
{stats}
Draws ranndom numbers from the uniform distribution
read.csv
{utils}
Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters
predict
{stats}
Predict Probability
table
{base}
Obtain frequency table of a variable/cross-tabulation of two variables
boxplot
{graphics}
Plot a simple box plot
select
{dplyr}
Select columns from a tibble/data frame
ls.str
{utils}
Similarly to ls, with a print() method that calls str() on each object
recode
{dplyr}
Recode a variable
chisq.test
{stats}
Chi-Squared test (e.g. for cross-tabulations)
arrow
{GGPLOT2}
Draw an arrow in a ggplot graph
pie
{graphics}
Creates a basic pie chart
barplot
{graphics}
Plot a simple bar plot
ggplot
{GGPLOT2}
Create a ggplot graph
t.test
{stats}
Performs one and two sample t-tests on vectors of data.
dnorm
{stats}
Density distribution for the normal distribution
rbind
{base}
Combine R objects by rows
order
{base}
Get indexes that will sort a vector
as.numeric
{base}
Coerce a vector to numeric
round
{base}
Rounds numbers
mean
{base}
Get mean of a vector
max
{base}
Get maximum of a vector
geom_hline
{GGPLOT2}
Add a horizontal line in GGPLOT2
matrix
{base}
Creates a matrix from the given set of values.
aes
{GGPLOT2}
Construct aesthetic mapping of a ggplot graph
sample
{base}
Takes a sample of the specified size
slice
{dplyr}
Subset rows using their positions
geom_vline
{GGPLOT2}
Draws a vertical line
geom_smooth
{GGPLOT2}
Generates a smoothed conditional means curve / line
ls
{base}
Return a vector of character strings giving the names of the objects in the specified environment
group_by
{dplyr}
Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise
median
{stats}
Get median of a vector
geom_bar
{GGPLOT2}
Generates a bar chart
rbeta
{stats}
Beta Random Number Generating Function
attach
{base}
Attach Set of R Objects to Search Path
confint
{stats}
Calculate confidence Intervals for Model Parameters
cbind
{base}
Combine R objects by columns
str
{utils}
Get the structure of an R object
ncol
{base}
Get number of columns of a data frame
desc
{dplyr}
Arrange in descending order
read.spss
{foreign}
Read a .sav file (SPSS data)
tabulate
{base}
Counts the number of times each integer occurs in an integer-only vector
sum
{base}
Get sum of numeric values or a vector
lm
{base}
Fit a linear model
sample_n
{dplyr}
Sample a number of observations from a data frame
theme
{GGPLOT2}
Set theme for GGPLOT2
ylab
{GGPLOT2}
Label the y axis (ggplot)
summary
{base}
Obtain summary statistics or detailed regression output
var
{stats}
Calculate variance
scale_x_continuous
{GGPLOT2}
Customise continuous x axis
subset
{base}
Return subsets of vectors, matrices or data frames which meet conditions.
arrange
{dplyr}
Sort values of data frame according to a variable/combination of varaibles
prop.table
{base}
Transform frequency table into table of proportions
scale_y_continuous
{GGPLOT2}
Customise continuous y axis
with
{base}
evaluate expression in the context of a data frame
as.data.frame
{base}
Functions to check if an object is a data frame, or coerce it if possible.
geom_point
{GGPLOT2}
Generates a scatter plot
plot
{graphics}
Generic function from base R to produce a plot
c
{base}
Combine values/vectors into a vector
coord_flip
{GGPLOT2}
Flip the x and y axes of a graph
theme_classic
{GGPLOT2}
A minimalistic theme with no gridlines
stargazer
{stargazer}
Create a regression output table
ifelse
{base}
Return a or b depending on the value of test
read_dta
{haven}
Read a .dta file (Stata data)
as.factor
{base}
Coerce a vector to factor
scale_colour_manual
{GGPLOT2}
Create your own discrete scale
complete.cases
{stats}
Find Complete Cases
rm
{base}
Remove objects
freq
{questionr}
Generate frequency tables
min
{base}
Get minimum of a vector
grid.arrange
{gridExtra}
Places graphical objects into a rectangular grid
reorder
{stats}
Reorder Levels of Factor based on the values of a second variable, usually numeric.
set.seed
{base}
Initialise a pseudorandom number generator.
range
{base}
Return range of values
setwd
{base}
Set Working Directory
View
{base}
View a data frame
geom_histogram
{GGPLOT2}
Generates a histogram
labs
{GGPLOT2}
Customise labels in GGPLOT2
install.packages
{base}
Install R package
class
{base}
Retrieve class of an R object
geom_ribbon
{GGPLOT2}
Generates an area plot
names
{base}
Retrieve names of a list/vector
which.max
{base}
return index of the largest value in a vector
ordered
{dplyr}
Create an ordered factor
read_excel
{readxl}
Read an Excel file
geom_segment
{GGPLOT2}
Generates a line segment or curve
head
{utils}
Show first 5 rows of a data frame
factor
{base}
Create a factor
The end!